↳ Prolog
↳ PrologToPiTRSProof
sum_in_gag([], [], []) → sum_out_gag([], [], [])
sum_in_gag(.(X1, Y1), .(X2, Y2), .(X3, Y3)) → U1_gag(X1, Y1, X2, Y2, X3, Y3, add_in_gag(X1, X2, X3))
add_in_gag(0, X, X) → add_out_gag(0, X, X)
add_in_gag(s(X), Y, s(Z)) → U3_gag(X, Y, Z, add_in_gag(X, Y, Z))
U3_gag(X, Y, Z, add_out_gag(X, Y, Z)) → add_out_gag(s(X), Y, s(Z))
U1_gag(X1, Y1, X2, Y2, X3, Y3, add_out_gag(X1, X2, X3)) → U2_gag(X1, Y1, X2, Y2, X3, Y3, sum_in_gag(Y1, Y2, Y3))
U2_gag(X1, Y1, X2, Y2, X3, Y3, sum_out_gag(Y1, Y2, Y3)) → sum_out_gag(.(X1, Y1), .(X2, Y2), .(X3, Y3))
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
sum_in_gag([], [], []) → sum_out_gag([], [], [])
sum_in_gag(.(X1, Y1), .(X2, Y2), .(X3, Y3)) → U1_gag(X1, Y1, X2, Y2, X3, Y3, add_in_gag(X1, X2, X3))
add_in_gag(0, X, X) → add_out_gag(0, X, X)
add_in_gag(s(X), Y, s(Z)) → U3_gag(X, Y, Z, add_in_gag(X, Y, Z))
U3_gag(X, Y, Z, add_out_gag(X, Y, Z)) → add_out_gag(s(X), Y, s(Z))
U1_gag(X1, Y1, X2, Y2, X3, Y3, add_out_gag(X1, X2, X3)) → U2_gag(X1, Y1, X2, Y2, X3, Y3, sum_in_gag(Y1, Y2, Y3))
U2_gag(X1, Y1, X2, Y2, X3, Y3, sum_out_gag(Y1, Y2, Y3)) → sum_out_gag(.(X1, Y1), .(X2, Y2), .(X3, Y3))
SUM_IN_GAG(.(X1, Y1), .(X2, Y2), .(X3, Y3)) → U1_GAG(X1, Y1, X2, Y2, X3, Y3, add_in_gag(X1, X2, X3))
SUM_IN_GAG(.(X1, Y1), .(X2, Y2), .(X3, Y3)) → ADD_IN_GAG(X1, X2, X3)
ADD_IN_GAG(s(X), Y, s(Z)) → U3_GAG(X, Y, Z, add_in_gag(X, Y, Z))
ADD_IN_GAG(s(X), Y, s(Z)) → ADD_IN_GAG(X, Y, Z)
U1_GAG(X1, Y1, X2, Y2, X3, Y3, add_out_gag(X1, X2, X3)) → U2_GAG(X1, Y1, X2, Y2, X3, Y3, sum_in_gag(Y1, Y2, Y3))
U1_GAG(X1, Y1, X2, Y2, X3, Y3, add_out_gag(X1, X2, X3)) → SUM_IN_GAG(Y1, Y2, Y3)
sum_in_gag([], [], []) → sum_out_gag([], [], [])
sum_in_gag(.(X1, Y1), .(X2, Y2), .(X3, Y3)) → U1_gag(X1, Y1, X2, Y2, X3, Y3, add_in_gag(X1, X2, X3))
add_in_gag(0, X, X) → add_out_gag(0, X, X)
add_in_gag(s(X), Y, s(Z)) → U3_gag(X, Y, Z, add_in_gag(X, Y, Z))
U3_gag(X, Y, Z, add_out_gag(X, Y, Z)) → add_out_gag(s(X), Y, s(Z))
U1_gag(X1, Y1, X2, Y2, X3, Y3, add_out_gag(X1, X2, X3)) → U2_gag(X1, Y1, X2, Y2, X3, Y3, sum_in_gag(Y1, Y2, Y3))
U2_gag(X1, Y1, X2, Y2, X3, Y3, sum_out_gag(Y1, Y2, Y3)) → sum_out_gag(.(X1, Y1), .(X2, Y2), .(X3, Y3))
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
SUM_IN_GAG(.(X1, Y1), .(X2, Y2), .(X3, Y3)) → U1_GAG(X1, Y1, X2, Y2, X3, Y3, add_in_gag(X1, X2, X3))
SUM_IN_GAG(.(X1, Y1), .(X2, Y2), .(X3, Y3)) → ADD_IN_GAG(X1, X2, X3)
ADD_IN_GAG(s(X), Y, s(Z)) → U3_GAG(X, Y, Z, add_in_gag(X, Y, Z))
ADD_IN_GAG(s(X), Y, s(Z)) → ADD_IN_GAG(X, Y, Z)
U1_GAG(X1, Y1, X2, Y2, X3, Y3, add_out_gag(X1, X2, X3)) → U2_GAG(X1, Y1, X2, Y2, X3, Y3, sum_in_gag(Y1, Y2, Y3))
U1_GAG(X1, Y1, X2, Y2, X3, Y3, add_out_gag(X1, X2, X3)) → SUM_IN_GAG(Y1, Y2, Y3)
sum_in_gag([], [], []) → sum_out_gag([], [], [])
sum_in_gag(.(X1, Y1), .(X2, Y2), .(X3, Y3)) → U1_gag(X1, Y1, X2, Y2, X3, Y3, add_in_gag(X1, X2, X3))
add_in_gag(0, X, X) → add_out_gag(0, X, X)
add_in_gag(s(X), Y, s(Z)) → U3_gag(X, Y, Z, add_in_gag(X, Y, Z))
U3_gag(X, Y, Z, add_out_gag(X, Y, Z)) → add_out_gag(s(X), Y, s(Z))
U1_gag(X1, Y1, X2, Y2, X3, Y3, add_out_gag(X1, X2, X3)) → U2_gag(X1, Y1, X2, Y2, X3, Y3, sum_in_gag(Y1, Y2, Y3))
U2_gag(X1, Y1, X2, Y2, X3, Y3, sum_out_gag(Y1, Y2, Y3)) → sum_out_gag(.(X1, Y1), .(X2, Y2), .(X3, Y3))
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
ADD_IN_GAG(s(X), Y, s(Z)) → ADD_IN_GAG(X, Y, Z)
sum_in_gag([], [], []) → sum_out_gag([], [], [])
sum_in_gag(.(X1, Y1), .(X2, Y2), .(X3, Y3)) → U1_gag(X1, Y1, X2, Y2, X3, Y3, add_in_gag(X1, X2, X3))
add_in_gag(0, X, X) → add_out_gag(0, X, X)
add_in_gag(s(X), Y, s(Z)) → U3_gag(X, Y, Z, add_in_gag(X, Y, Z))
U3_gag(X, Y, Z, add_out_gag(X, Y, Z)) → add_out_gag(s(X), Y, s(Z))
U1_gag(X1, Y1, X2, Y2, X3, Y3, add_out_gag(X1, X2, X3)) → U2_gag(X1, Y1, X2, Y2, X3, Y3, sum_in_gag(Y1, Y2, Y3))
U2_gag(X1, Y1, X2, Y2, X3, Y3, sum_out_gag(Y1, Y2, Y3)) → sum_out_gag(.(X1, Y1), .(X2, Y2), .(X3, Y3))
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ PiDP
ADD_IN_GAG(s(X), Y, s(Z)) → ADD_IN_GAG(X, Y, Z)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPSizeChangeProof
↳ PiDP
ADD_IN_GAG(s(X), s(Z)) → ADD_IN_GAG(X, Z)
From the DPs we obtained the following set of size-change graphs:
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
U1_GAG(X1, Y1, X2, Y2, X3, Y3, add_out_gag(X1, X2, X3)) → SUM_IN_GAG(Y1, Y2, Y3)
SUM_IN_GAG(.(X1, Y1), .(X2, Y2), .(X3, Y3)) → U1_GAG(X1, Y1, X2, Y2, X3, Y3, add_in_gag(X1, X2, X3))
sum_in_gag([], [], []) → sum_out_gag([], [], [])
sum_in_gag(.(X1, Y1), .(X2, Y2), .(X3, Y3)) → U1_gag(X1, Y1, X2, Y2, X3, Y3, add_in_gag(X1, X2, X3))
add_in_gag(0, X, X) → add_out_gag(0, X, X)
add_in_gag(s(X), Y, s(Z)) → U3_gag(X, Y, Z, add_in_gag(X, Y, Z))
U3_gag(X, Y, Z, add_out_gag(X, Y, Z)) → add_out_gag(s(X), Y, s(Z))
U1_gag(X1, Y1, X2, Y2, X3, Y3, add_out_gag(X1, X2, X3)) → U2_gag(X1, Y1, X2, Y2, X3, Y3, sum_in_gag(Y1, Y2, Y3))
U2_gag(X1, Y1, X2, Y2, X3, Y3, sum_out_gag(Y1, Y2, Y3)) → sum_out_gag(.(X1, Y1), .(X2, Y2), .(X3, Y3))
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
U1_GAG(X1, Y1, X2, Y2, X3, Y3, add_out_gag(X1, X2, X3)) → SUM_IN_GAG(Y1, Y2, Y3)
SUM_IN_GAG(.(X1, Y1), .(X2, Y2), .(X3, Y3)) → U1_GAG(X1, Y1, X2, Y2, X3, Y3, add_in_gag(X1, X2, X3))
add_in_gag(0, X, X) → add_out_gag(0, X, X)
add_in_gag(s(X), Y, s(Z)) → U3_gag(X, Y, Z, add_in_gag(X, Y, Z))
U3_gag(X, Y, Z, add_out_gag(X, Y, Z)) → add_out_gag(s(X), Y, s(Z))
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPSizeChangeProof
SUM_IN_GAG(.(X1, Y1), .(X3, Y3)) → U1_GAG(Y1, Y3, add_in_gag(X1, X3))
U1_GAG(Y1, Y3, add_out_gag(X2)) → SUM_IN_GAG(Y1, Y3)
add_in_gag(0, X) → add_out_gag(X)
add_in_gag(s(X), s(Z)) → U3_gag(add_in_gag(X, Z))
U3_gag(add_out_gag(Y)) → add_out_gag(Y)
add_in_gag(x0, x1)
U3_gag(x0)
From the DPs we obtained the following set of size-change graphs: